import React from "react"
import HomeData from "../../mockdata/home.json";
import { Table }  from "antd"
import Search from "./search.jsx"
class Home extends React.Component{
	constructor(props) {
		let columns = [
			{
				title: "ID",
				dataIndex: "id"
			},
			{
				title: "名称一",
				dataIndex: "name"
			},
			{
				title: "名称二",
				dataIndex: "username"
			},
			{
				title: "Email",
				dataIndex: "email"
			}
		]
		super(props)
		this.state = {columns:columns}
	}
	render() {
		let {columns} = this.state;
		return (
			<div>
				<div style={{marginBottom:"20px",padding:"10px 15px"}}>
					<Search/>
				</div>
				<Table columns={columns} dataSource={HomeData}/>
			</div>
		)
	}
}
export default Home